using System;

namespace ZFramework.Runtime
{
    public class ShowItemInfo : IReference
    {
        private Type _itemLogicType;
        private object _userData;

        public ShowItemInfo()
        {
            _itemLogicType = null;
            _userData = null;
        }

        public Type ItemLogicType
        {
            get { return _itemLogicType; }
        }

        public object UserData
        {
            get { return _userData; }
        }

        public static ShowItemInfo Create(Type entityLogicType, object userData)
        {
            ShowItemInfo showItemInfo = ReferencePool.Acquire<ShowItemInfo>();
            showItemInfo._itemLogicType = entityLogicType;
            showItemInfo._userData = userData;
            return showItemInfo;
        }

        public void Clear()
        {
            _itemLogicType = null;
            _userData = null;
        }
    }
}
